import java.util.Scanner;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: Admin
 * Date: 2022-12-01
 * Time: 17:13
 */
public class Demo1 {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);

        while(scan.hasNextLine()) {

            String str1 = scan.nextLine();
            String str2 = scan.nextLine();
            String str3 = str1.replace(str2,"$");
            int count = 0;
            for(int i = 0; i < str3.length(); i++) {
                if(str3.charAt(i) == '$') {
                    count++;
                }
            }
            System.out.println(count);
        }
    }
}
